﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

public enum Direction
{
    None,
    Left,
    Right,
    Up,
    Down
}

public static class Globals
{
    public static bool IsPaused = false;

    public static PlayerAndChar Players = PlayerAndChar.NONE;

    public static double CollisionHeight = 0.5;

    public static double CollisionWidth = 0.5;

    private static Random Random = new Random();

    private static double lastDouble = 0;

    private static bool mute = false;

    public static bool Mute
    {
        get { return mute; }
        set
        {
            mute = value;

            if (mute)
                AudioManager.StopMusic();
            else
                AudioManager.ContinueMusic();
        }
    }

    private static bool fullScreen = false;

    public static bool FullScreen
    {
        get { return fullScreen; }
        set
        {
            ScreenManager.Graphics.ToggleFullScreen();
            fullScreen = value;
        }
    }

    public static double GetRandomDouble
    {
        get 
        {
            double aux = Random.NextDouble();
            if (aux == lastDouble)
            {
                Random = new Random((int)DateTime.Now.Ticks);
                lastDouble = Random.NextDouble();
                return lastDouble;
            }
            return aux;
        } 
    }
}

